home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3x / datapipe.z / datapipe
Encoding:
Text File  |  2001-04-17  |  8.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ddddaaaattttaaaappppiiiippppeeee((((3333XXXX))))                                                      ddddaaaattttaaaappppiiiippppeeee((((3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      datapipe: dpipeCreate, dpipeDestroy, dpipeTransfer, dpipeReset,
  10.      dpipeFlush- data pipe operations.
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_dddd_pppp_iiii_pppp_eeee_...._hhhh_>>>>
  14.  
  15.      _iiii_nnnn_tttt _dddd_pppp_iiii_pppp_eeee_CCCC_rrrr_eeee_aaaa_tttt_eeee _((((_iiii_nnnn_tttt _ssss_rrrr_cccc______ffff_dddd_,,,, _iiii_nnnn_tttt _ssss_iiii_nnnn_kkkk______ffff_dddd_))))_;;;;
  16.  
  17.      _iiii_nnnn_tttt _dddd_pppp_iiii_pppp_eeee_DDDD_eeee_ssss_tttt_rrrr_oooo_yyyy _((((_iiii_nnnn_tttt _pppp_iiii_pppp_eeee_ffff_dddd_))))_;;;;
  18.  
  19.      ___________iiii_nnnn_tttt_6666_4444______tttt _dddd_pppp_iiii_pppp_eeee_TTTT_rrrr_aaaa_nnnn_ssss_ffff_eeee_rrrr _((((_iiii_nnnn_tttt _pppp_iiii_pppp_eeee_ffff_dddd_,,,, _dddd_pppp_iiii_pppp_eeee______llll_iiii_bbbb______hhhh_dddd_llll______tttt _ssss_rrrr_cccc______cccc_oooo_nnnn_tttt_eeee_xxxx_tttt_,,,,
  20.           _dddd_pppp_iiii_pppp_eeee______llll_iiii_bbbb______hhhh_dddd_llll______tttt _ssss_iiii_nnnn_kkkk______cccc_oooo_nnnn_tttt_eeee_xxxx_tttt_))))_;;;;
  21.  
  22.      _iiii_nnnn_tttt _dddd_pppp_iiii_pppp_eeee_SSSS_tttt_oooo_pppp _((((_iiii_nnnn_tttt _pppp_iiii_pppp_eeee_ffff_dddd_,,,, ___________iiii_nnnn_tttt_6666_4444______tttt _tttt_rrrr_aaaa_nnnn_ssss_ffff_eeee_rrrr______iiii_dddd_))))_;;;;
  23.  
  24.      _iiii_nnnn_tttt _dddd_pppp_iiii_pppp_eeee_RRRR_eeee_ssss_eeee_tttt _((((_iiii_nnnn_tttt _pppp_iiii_pppp_eeee_ffff_dddd_))))_;;;;
  25.  
  26.      _iiii_nnnn_tttt _dddd_pppp_iiii_pppp_eeee_FFFF_llll_uuuu_ssss_hhhh _((((_iiii_nnnn_tttt _pppp_iiii_pppp_eeee_ffff_dddd_))))_;;;;
  27.  
  28.      _iiii_nnnn_tttt _dddd_pppp_iiii_pppp_eeee_SSSS_tttt_aaaa_tttt_uuuu_ssss _((((_iiii_nnnn_tttt _pppp_iiii_pppp_eeee_ffff_dddd_,,,, ___________iiii_nnnn_tttt_6666_4444______tttt _tttt_rrrr_aaaa_nnnn_ssss_ffff_eeee_rrrr______iiii_dddd_))))_;;;;
  29.  
  30. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  31.      Data pipes are dynamic connections between two hardware devices that
  32.      support peer-to-peer data transfers. These connections are created by an
  33.      application to process a data stream from a source device to a sink
  34.      device.  The purpose is to have minimum system impact during I/O
  35.      operations.
  36.  
  37.      ddddppppiiiippppeeeeCCCCrrrreeeeaaaatttteeee creates a data pipe between two file descriptors: _s_r_c__f_d is
  38.      the source file descriptor, and _s_i_n_k__f_d is the sink file descriptor.
  39.      Either file descriptor can refer to a regular file, a special device
  40.      file, or potentially a socket (not available for now). Both should be
  41.      open when passed to ddddppppiiiippppeeeeCCCCrrrreeeeaaaatttteeee and should keep open during the course of
  42.      the data pipe operation.  If any one is closed, the data pipe will not
  43.      function correctly.
  44.  
  45.      ddddppppiiiippppeeeeCCCCrrrreeeeaaaatttteeee returns a file descriptor as a handler to the data pipe.
  46.      This handler is used in other data pipe routines to reference the data
  47.      pipe that is created. This is also used when bandwidth allocation is
  48.      requested on the data pipe (Note: priority bandwidth allocation is not
  49.      supported for early access).
  50.  
  51.      ddddppppiiiippppeeeeDDDDeeeessssttttrrrrooooyyyy halts all data flow between source and sink and destroys the
  52.      data pipe.
  53.  
  54.      ddddppppiiiippppeeeeTTTTrrrraaaannnnssssffffeeeerrrr starts the data flow in the data pipe specified by _p_i_p_e_f_d.
  55.      _s_r_c__c_o_n_t_e_x_t and _s_i_n_k__c_o_n_t_e_x_t are handles to the transfer context that has
  56.      been setup by the two pipe ends before ddddppppiiiippppeeeeTTTTrrrraaaannnnssssffffeeeerrrr is called (see
  57.      below). This is an asynchronous IO operation. In order to reference this
  58.      transfer later, ddddppppiiiippppeeeeTTTTrrrraaaannnnssssffffeeeerrrr returns a transfer id (non negative) for
  59.      the application to identify a particular transfer. It is unique within a
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ddddaaaattttaaaappppiiiippppeeee((((3333XXXX))))                                                      ddddaaaattttaaaappppiiiippppeeee((((3333XXXX))))
  71.  
  72.  
  73.  
  74.      data pipe.
  75.  
  76.      Each pipe end has its own way to set up the transfer context. In the
  77.      regular file case, see ddddppppiiiippppeeee____ffffssssppppeeee____ggggeeeetttt____hhhhddddllll((((3333xxxx)))) and ddddppppiiiippppeeee____ffffssssppppeeee____sssseeeetttt____ccccttttxxxx((((3333xxxx))))....
  78.      For early access, only xfs file system supports data pipe.
  79.  
  80.      ddddppppiiiippppeeeeSSSSttttoooopppp stops the transfer specified by _p_i_p_e_f_d and _t_r_a_n_s_f_e_r__i_d.
  81.  
  82.      ddddppppiiiippppeeeeFFFFlllluuuusssshhhh returns only after all the pending transfers in a data pipe
  83.      are completed or when an error occurred during the transfer.  It is
  84.      useful, for example, when the application wishes to close one pipe end
  85.      but is not sure whether the transfer is over.
  86.  
  87.      ddddppppiiiippppeeeeSSSSttttaaaattttuuuussss returns the status of the transfer specified by _p_i_p_e_f_d and
  88.      _t_r_a_n_s_f_e_r__i_d. The potential values are:
  89.  
  90.      DPIPE_TRANS_COMPLETE     The transfer is completed successfully.
  91.  
  92.      DPIPE_TRANS_PENDING      The transfer is still pending.
  93.  
  94.      DPIPE_TRANS_CANCELLED    The transfer is cancelled. It's the result of
  95.                               ddddppppiiiippppeeeeSSSSttttoooopppp(((())))....
  96.  
  97.      DPIPE_TRANS_ERROR        The transfer failed.
  98.  
  99. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  100.      On success, ddddppppiiiippppeeeeSSSSttttaaaattttuuuussss returns the status value (which is always non-
  101.      negative); ddddppppiiiippppeeeeTTTTrrrraaaannnnssssffffeeeerrrr returns transfer id (always non negative); all
  102.      other routines return 0. On failure, all the routines return -1 and errno
  103.      is set to one of the following:
  104.  
  105.      [EBADFD]  The file descriptors is invalid.
  106.  
  107.      [EINVAL]  One or more of the parameters are invalid.  [EOPNOTSUPP] The
  108.                operation is not supported on the system.  [ENOMEM] Not enough
  109.                space for memory allocation.
  110.  
  111. FFFFIIIILLLLEEEESSSS
  112.      /usr/share/src/irix/examples/dpipe/src/dpcp.c is an example which copies
  113.      one regular file to another.
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.